//@ sourceURL=RectificationView.js
Ext.ns("RectificationView");

RectificationView = Ext.extend(Ext.Panel,{
    constructor : function(a) {
        Ext.applyIf(this, a);
        var all=this.initUIComponents();
        RectificationView.superclass.constructor.call(this, {
            id : "RectificationView",
            region : "center",
            layout : "border",
            border : false,
            iconCls : "menu-position",
            items : [all.yearGridPanel,all.yearGridSearchPanel]
        });
    },
    initUIComponents : function() {
    var yearGridComponents=new creategridview({
        topbar : {
            inputFormName : 'RectificationForm',
            topbarAdd:{
                hidden:false
            },
            topbarDel:{
                hidden:false
            }
        },
        search : {
            items : [ {
                style : "margin:5px 5px 5px 5px;",
                text : "整改人/部门"
            }, {
                columnWidth : 0.2,
                xtype : "textfield",
                name : "Q_department_S_LK",
                maxLength : 256
            } ]
        },
        grid : {
            title : "隐患整改列表",
            rowActions:true,
            listUrl : __ctxPath + "/relatedparty/listRectification.do",
            removeUrl : __ctxPath + "/relatedparty/deleteRectification.do",
            fields : [ "id","changeDate","department", "changeMeasures", "changeConclusion"],
            columns : [ {
                header : "id",
                dataIndex : "id",
                hidden : true
            },{
                header : "整改时间",
                dataIndex : "changeDate",
                width:80
            },{
                header : "整改人/部门",
                dataIndex : "department",
                width:70
            },{
                header : "整改措施",
                dataIndex : "changeMeasures",
                width:80
            },{
                header : "整改结论",
                dataIndex : "changeConclusion",
                width:80
            } ]
        },
        formCfg : {
            existingProblemsId : this.existingProblemsId
        }
        
    });
    return yearGridComponents;
}
});
RectificationView.edit = function(id) {
    new RectificationForm({
        id : id,
        operation: Constant.Operation.EDIT
    }).show();
};